#include <stdio.h>
#include <stdarg.h>
#include <sys/time.h>
#include <time.h>

void print_log_stamp(const char * pFuntion, const char* pModule, const int line,const char *format, ...)
{
	char buf[1024] = "";
	static char datestr[40] ={0};
	static struct timeval __tv;
	static struct tm *__tm;
    gettimeofday(&__tv,NULL);
	__tm = localtime(&__tv.tv_sec);
	sprintf(datestr,"%04d/%02d/%02d %02d:%02d:%02d.%06ld"
		,__tm->tm_year+1900,__tm->tm_mon+1,__tm->tm_mday
		,__tm->tm_hour,__tm->tm_min,__tm->tm_sec,__tv.tv_usec);
	sprintf(buf, "(%s)[%s][%s][line:%d]%s\n",datestr,pModule, pFuntion,line, format);
	va_list args;
	va_start(args, format);
	vprintf(buf, args);
	va_end(args);
}